package com.fast.admin.controller.common;

import com.fast.framework.core.AjaxResult;
import com.fast.framework.core.model.RegisterBody;
import com.fast.framework.core.service.IRegisterService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@Api(tags = "注册API")
@RestController
public class RegisterController {
    @Resource
    private IRegisterService registerService;

    @ApiOperation(value = "注册接口")
    @PostMapping("/register")
    public AjaxResult register(@RequestBody RegisterBody user) {
        String msg = registerService.register(user);
        return AjaxResult.success(msg);
    }
}
